<?php 
	header("Content-Type:text/html; charset=UTF-8");
	$xml = "";
	$file = fopen('test.xml','r');
	while($data = fread($file,4096)){
		$xml .= $data;
	}
	fclose($file);
	
	preg_match_all("/\<humans\>(.*?)\<\/humans\>/s",$xml,$humans);
	
	foreach($humans[1] as &$val){
		preg_match_all("/\<name\>(.*?)\<\/name\>/",$val,$name);
		preg_match_all("/\<sex\>(.*?)\<\/sex\>/",$val,$gerden);
		preg_match_all("/\<old\>(.*?)\<\/old\>/",$val,$age);
		$name = $name[1];
		$gerden = $gerden[1];
		$age = $age[1];
	}
	foreach($name as $key => &$val){
		echo $val. "--". $gerden[$key]. "--". $age[$key]."<br/>";
	}
	